**************** Ethnic Exclusion and Civil Resistance Campaigns ****************


	xtset CTR YEAR
	


*Figure 1
	tab CAMP if EXCL<.10
	tab CAMP if EXCL>.10 & EXCL<.20
	tab CAMP if EXCL>.20 & EXCL<.50
	tab CAMP if EXCL>.50
	
*TABLE 1
	*Model 1
	mlogit CAMP lEXCL /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	
	gen model1 =e(sample)
	tab CAMP if model1
	
	*Model 2
	mlogit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	
	gen model2 =e(sample)
	tab CAMP if model2
	
	*Model 3
	mlogit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	lINS ETH lOIL ///
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	test[1=2]: lINS
	test[1=2]: ETH
	test[1=2]: lOIL
	
	gen model3 =e(sample)
	tab CAMP if model3
	
	
*FIGURE 2		
	*Violent onset
	logit VIOCAMP lEXCL /// 
	lGDP lPOP lPOL  ///  
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6, cl(CTR)
		
	margins, at (lEXCL= (0(.1)1))
	marginsplot, l(90) ///
	recast(line) ///
	recastci(rline) ///
	ciopts(lpattern(dash)) ///
	yline(0) ///
	xlabel(#5) ///
	legend(on ///
	label(1 "95% confidence interval") ///
	label(2 "Predicted probabilities")) ///
	xtitle(Ethnic exclusion) ///
	ytitle("p (Violent onset)") ///
	title("") ///
	scheme(s2mono)
		
	*Nonviolent onset
	logit NONCAMP lEXCL /// 
	lGDP lPOP lPOL  ///  
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6, cl(CTR)
		
	margins, at (lEXCL= (0(.1)1))
	marginsplot, l(90) ///
	recast(line) ///
	recastci(rline) ///
	ciopts(lpattern(dash)) ///
	yline(0) ///
	xlabel(#5) ///
	legend(on ///
	label(1 "95% confidence interval") ///
	label(2 "Predicted probabilities")) ///
	xtitle(Ethnic exclusion) ///
	ytitle("p (Nonviolent onset)") ///
	title("") ///
	scheme(s2mono)
		
*TABLE 2
	*Model 4	
	mlogit CAMP lEXCL /// 
	lREPR /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lREPR
	
	gen model4 = e(sample)
	tab CAMP if model4

	*Model 5
	mlogit CAMP lEXCL /// 
	lREPR /// 
	lGDP lPOP lPOL  /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lREPR
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	
	gen model5 = e(sample)
	tab CAMP if model5
	
	*Model 6
	mlogit CAMP lEXCL /// 
	lREPR /// 
	lGDP lPOP lPOL /// 
	lINS ETH lOIL ///
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lREPR
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	test[1=2]: lINS
	test[1=2]: ETH
	test[1=2]: lOIL
	
	gen model6 = e(sample)
	tab CAMP if model6
	
*FIGURE 3 and TABLE A5
	*Model A4a
	medeff (regress lREPR lEXCL lGDP lPOP lPOL ///
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6) ///
	(logit VIOCAMP lEXCL lREPR lGDP lPOP lPOL ///
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6) ///
	, mediate(lREPR) treat(lEXCL) sims(1000) vce(cl CTR)
		
	*Model A4b
	medeff (regress lEXCL lREPR lGDP lPOP lPOL ///
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6) ///
	(logit VIOCAMP lREPR lEXCL lGDP lPOP lPOL ///
	lVIOONG lNONONG lPEACE TIME REG2 REG3 REG4 REG5 REG6) ///
	, mediate(lEXCL) treat(lREPR) sims(1000) vce(cl CTR)
	
*TABLE A1
	sum NONCAMP VIOCAMP lEXCL lREPR lGDP lPOP lPOL  ///
	lINS ETH lOIL
 
 
*TABLE A2
	corr NONCAMP lEXCL lREPR lGDP lPOP lPOL  ///
	lINS ETH lOIL
	corr VIOCAMP lEXCL lREPR lGDP lPOP lPOL  ///
	lINS ETH lOIL
	
*TABLE A3
	*Model A1
	mprobit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	
	gen modela1 =e(sample)
	tab CAMP if modela1
	
	*Model A2
	mlogit CAMP lEXCL /// 
	lGDP lPOP lDD /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lDD
	
	gen modela2 =e(sample)
	tab CAMP if modela2
	
	*Model A3
	mlogit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	lINS POLETH lOIL ///
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	test[1=2]: lINS
	test[1=2]: POLETH
	test[1=2]: lOIL
	
	gen modela3 =e(sample)
	tab CAMP if modela3
	
*TABLE A4
	*Model A4
	mlogit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	TERRCAMP lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	test[1=2]: TERRCAMP
	
	gen modela4 =e(sample)
	tab CAMP if modela4
	
	*Model A5
	mlogit GOVCAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	
	gen modela5 =e(sample)
	tab GOVCAMP if modela5
	
	*modela6
	mlogit CAMP lEXCL /// 
	lGDP lPOP lPOL  /// 
	RAD lVIOONG lNONONG lPEACE TIME i.REGION, cl(CTR)
	test[1=2]: lEXCL
	test[1=2]: lGDP
	test[1=2]: lPOP
	test[1=2]: lPOL
	test[1=2]: RAD
	
	gen modela6 =e(sample)
	tab CAMP if modela6
	
	
	